<template>
	<view class="">
		<scroll-view scroll-y>
			<view class="m-5 p-5 bg-white rounded shadow flex justify-between items-center" v-for="i in list"
				@click="onList(i)">
				<view class="">
					<view class="">
						{{i.purchaseName}}
					</view>
					<view class="text-black-666">
					</view>
				</view>
				<view class="">
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>
		</scroll-view>
		
	</view>
</template>

<script>
	import request from '@/utils/request.js'
import { route } from '@/utils/utils'
	export default {
		data() {
			return {
				list: null
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			onList({purchaseBillId}) {
				route('/pages/purchase/goods_list', {
					purchaseBillId,
					type:3
				})
				
				// route('/pages/order/goods_list', {
				// 	purchaseBillId,
				// 	type:3
				// })
			},
			getList() {
				request('purchaseBills', {
					row: true,
					data: {
						billStatus: 1,
					}
				}).then(res => {
					if (res.code === 200) {
						this.list = res.rows
					}
				})
			}
		},
	}
</script>

<style>
</style>